-- Initialize of SCANDALmacro initRCP global gDisc global gFulCol global gPathPict global gPathItem global gPathText global gPathAiff global gBGMnum global gPHTnum global gSLDtim global gSLDmode global gPictNum put 1 into gDisc if (envCheck()=FALSE) then quit end if cursor 4 put "SCNWIN:PHOTO8:" into gPathPict put "SCNWIN:ITEM:" into gPathItem put "SCNWIN:TEXT:" into gPathText put "SCNWIN:AIFF:" into gPathAiff if (gFulCol = 1) then put "SCNWIN:PHOTO24:" into gPathPict end if put 1 into gPHTnum put 0 into gSLDmode put item 2 of ( line 3 of field "TimeList" ) into vTim put value(vTim) into gSLDtim set the soundEnabled to TRUE aiffSound(0) aiffSound(1)-- set the exitLock to TRUE set the keyDownScript to "keyBoard()"-- getPicture( the number of cast "BCK.PICT", gPathItem & "BG000.DIB") upDateStage go to frame "OPN00"-- +++++++++++++++++++++++++++++++++ environment checkermacro envCheck global gFulCol if (the colorDepth < 8 ) then alert "256 Color mode is required" return FALSE end if if (the colorDepth > 8 ) then put 1 into gFulCol else put 0 into gFulCol end if return TRUE-- ++++++++++++++++++++++++++++++++ KEY BOARD handlermacro keyBoard global gSLDtim global gBgmNum if (the key = "Q" AND commandDown()) then termRCP() end if if (the key = "S" AND commandDown()) then if (the soundEnabled = TRUE) then aiffSound(0) set the soundEnabled to FALSE else set the soundEnabled to TRUE aiffSound(gBgmNum) end if end if put (the key) into vKeyin if (vKeyin >= "1" AND vKeyin <= "9") then put value(vKeyin) into vNum put item 2 of (line vNum of field "TimeList") into vTim put value(vTim) into gSLDtim end if-- ++++++++++++++++++++++++++++++++ terminate Gingermacro termRCP set the keyDownScript to EMPTY go to frame "ENDING" upDateStage quit
-- Standard Services-- ++++++++++++++++++++++++++++++++ clear Picture of cast vCastmacro clrPicture vCast set the picture of cast vCast to the picture of cast "EmptyPict"-- ++++++++++++++++++++++++++++++++ getText from fileNamemacro getText fileName put FileIO(mNew,"read",fileName) into vText if objectp(vText) then put vText(mReadFile) into retText vText(mDispose) else put "" into retText end if return (retText)-- ++++++++++++++++++++++++++++++++ getPicture from fileName to vCastmacro getPicture vCast, fileName if (the name of cast vCast <> "") then set nameOfCast to the name of cast vCast else set nameOfCast to "" end if put FileIO(mNew,"read",fileName) into vPict if (not objectp(vPict)) then alert "Error(getPicture):"&fileName&RETURN&"code:"&vPict return (FALSE) end if set the picture of cast vCast to vPict(mReadPict) if (the size of cast vCast = 0) then clrPicture(vCast) set the name of cast vCast to nameOfCast unload unloadCast set the picture of cast vCast to vPict(mReadPict) if (the size of cast vCast = 0) then clrPicture(vCast) set the name of cast vCast to nameOfCast vPict(mDispose) alert "Error(getPicture):"&fileName&RETURN&"code:"&vPict&RETURN&"Not enough Memory" return (FALSE) end if end if vPict(mDispose) return(TRUE) -- ++++++++++++++++++++++++++++++++ set vSprite as Pict for vCast(BitMap) with vInkmacro setPictSprite vSprite, vCast, vInk if the type of sprite vSprite = 0 then set the type of sprite vSprite to 1 puppetSprite vSprite ,TRUE set the castNum of sprite vSprite to the number of cast vCast set the ink of sprite vSprite to vInk-- ++++++++++++++++++++++++++++++++ set vSprite as Text vCast(Text) with vInk locate vH vVmacro setTextSprite vSprite, vCast, vInk, vH, vV if the type of sprite vSprite = 0 then set the type of sprite vSprite to 7 puppetSprite vSprite ,TRUE set the castNum of sprite vSprite to the number of cast vCast set the ink of sprite vSprite to vInk set the locH of sprite vSprite to vH set the locV of sprite vSprite to vV-- ++++++++++++++++++++++++++++++++ control buttonmacro pushButton com put item 1 of the name of cast (the castNum of sprite clickOn()) into cName repeat while stilldown() if rollover(clickOn()) then set the castNum of sprite clickOn() = the number of cast (cName&",DN") else set the castNum of sprite clickOn() = the number of cast (cName&",UP") end if upDateStage end repeat set the castNum of sprite clickOn() = the number of cast (cName&",UP") updateStage if rollOver(clickOn()) then do com-- ++++++++++++++++++++++++++++++++ QTmovie rewind to Top buttonmacro qtTop vSprite set the movieTime of sprite vSprite to 0 set the movieRate of sprite vSprite to 0 set the startTime of sprite vSprite to 0 upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie rewind to vTop buttonmacro XqtTop vSprite, vTop set the movieTime of sprite vSprite to vTop set the movieRate of sprite vSprite to 0 set the startTime of sprite vSprite to vTop upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie rewind(10sec) buttonmacro qtRew vSprite put the movieTime of sprite vSprite into vTime if (vTime > 600) then put (vTime - 600) into vTime else put 0 into vTime end if set the movieTime of sprite vSprite to vTime upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie rewind(10sec but limit) buttonmacro XqtRew vSprite, vTop put the movieTime of sprite vSprite into xTime put (xTime - vTop) into vTime if (vTime > 600) then put (xTime - 600) into vTime else put vTop into vTime end if set the movieTime of sprite vSprite to vTime upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie forward(10sec) buttonmacro qtFwd vSprite put the movieTime of sprite vSprite into vTime put (the duration of cast (the castNum of sprite vSprite)) into vLen if ((vLen - vTime)>600) then put (vTime + 600) into vTime else put (vLen - 1) into vTime end if set the movieTime of sprite vSprite to vTime upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie forward(10sec but limit) buttonmacro XqtFwd vSprite, vEnd put the movieTime of sprite vSprite into vTime if ((vEnd - vTime)>600) then put (vTime + 600) into vTime else put vEnd into vTime end if set the movieTime of sprite vSprite to vTime upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie pause buttonmacro qtPau vSprite global gAviTime if (the movieRate of sprite vSprite = 0) then if (the movieTime of sprite vSprite > 0) then put the movieTime of sprite vSprite into gAviTime set the startTime of sprite vSprite to gAviTime set the movieRate of sprite vSprite to 1 end if else set the movieRate of sprite vSprite to 0 end if upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie Stop buttonmacro qtStp vSprite set the movieRate of sprite vSprite to 0 upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie play buttonmacro qtPly vSprite global gAviTime put the movieTime of sprite vSprite into gAviTime set the startTime of sprite vSprite to gAviTime set the movieRate of sprite vSprite to 1 upDateStage-- ++++++++++++++++++++++++++++++++ QTmovie yalp(reverse play) buttonmacro qtYlp vSprite global gAviTime put the movieTime of sprite vSprite into gAviTime set the startTime of sprite vSprite to gAviTime set the movieRate of sprite vSprite to -1 updateStage-- ++++++++++++++++++++++++++++++++ QTmovie sound togglemacro qtSoundToggle if the sound of cast (the castNum of sprite clickOn()) = TRUE then set the sound of cast (the castNum of sprite clickOn()) = FALSE else set the sound of cast (the castNum of sprite clickOn()) = TRUE end if -- ++++++++++++++++++++++++++++++++ AIFF sound file control in soundchannel 2macro aiffSound vNum global gPathAiff global gBgmNum if the soundEnabled = FALSE then return end if if vNum = 0 then if soundBusy(1) then sound stop 1 end if put 0 into gBgmNum else if soundBusy(1) AND gBgmNum = vNum then return end if sound playFile 1, gPathAiff & "BGM0" & string(vNum) & ".AIF" put vNum into gBgmNum end if-- Fade out other channelmacro aiffFadeOut vNum repeat with n = 1 to 4 if (vNum <> n) then if soundBusy(n) then sound fadeOut n, 60 end if end if end repeat-- wait click (or vTim seconds)macro clickWait vTim startTimer repeat while TRUE if (the timer > (vTim*60)) then exit repeat end if if (the mouseDown) then return(FALSE) end repeat return(TRUE)--+++++++++++++++++++++++++++++++++ Palette change at black framemacro chgScene vPal, vFrm, vBackName global gFulCol if (gFulCol = 0) then go to frame "PALCHN" end if puppetPalette vPal puppetTransition 23 upDateStage getPicture(the number of cast "BCK.PICT", vBackName) puppetTransition 23 go to frame vFrm upDateStage
-- For HOME MENU-- ++++++++++++++++++++++++++++++++ MENU TITLEmacro openHOME global gPathItem aiffSound(1) chgScene("PL-OPN", the frame + 1, gPathItem & "BG000.DIB") repeat with n = 1 to 24 puppetSprite n, FALSE end repeat upDateStage cursor -1-- ++++++++++++++++++++++++++++++++ branch by vBox (0 = quit)macro HomeBranch vBox global gPHTnum if (vBox = 1) then cursor 4 put 1 into gPHTnum go to frame "PHT00" end if if (vBox = 2) then cursor 4 put 2 into gPHTnum go to frame "PHT00" end if if (vBox = 3) then cursor 4 put 3 into gPHTnum go to frame "PHT00" end if if (vBox = 4) then cursor 4 go to frame "MVB00" end if if (vBox = 0) then termRCP() end if
-- For Photo Box-- ++++++++++++++++++++++++++++++++ initialize of Photo Box (vBox)macro initPHT global gPathItem global gPHTnum global gPictNum global gSLDmode global gPictMax cursor 4 aiffSound(2) put 0 into gPictNum put 0 into gSLDmode put item gPHTnum of field "PictMax" into vMax put value(vMax) into gPictMax put gPHTnum into vBox put "PL-" & string(vBox) & "00" into vPL chgScene(vPL, "PHT01", gPathItem & "BG" & string(vBox) & "01.DIB") puppetSprite 19,TRUE set the visibility of sprite 19 to FALSE puppetSprite 20,TRUE set the visibility of sprite 20 to FALSE dispPANEL() upDateStage cursor -1-- ++++++++++++++++++++++++++++++++ termination of Personal Boxmacro termPHT mode global gPHTnum if (gPHTnum = mode) then return exit end if cursor 4 erasePictPHT() erasePANEL() repeat with n = 2 to 24 puppetSprite n, FALSE end repeat clrPicture( "PHT.PICT" ) clrPicture( "PHT.PANEL" ) puppetTransition 23 upDateStage if (mode = -1) then go to frame "OPN01" exit end if if (mode = 4) then go to frame "MVB00" exit end if put mode into gPHTnum go to frame "PHT00"-- ++++++++++++++++++++++++++++++++ return position of pictureMatrix(7 * 6)macro nOfMatrix put the left of sprite clickOn() into L put the top of sprite clickOn() into T put (mouseH() - L) / 66 into hBlock put (mouseV() - T) / 64 into vBlock put ((vBlock * 8) + hBlock) + 1 into vMat return(vMat)-- +++++++++++++++++++++++++++++++ return sequential number of picture from positionmacro seqOfMat vBox, vMat put ((vMat -1) / 8) + 1 into vL put ((vMat -1) mod 8) + 1 into vC put "PictSeq" & string(vBox) into vName put item vC of (line vL of field vName) into vZ put value(vZ) into vSeq return(vSeq)-- +++++++++++++++++++++++++++++++ return type of picture from numbermacro typOfMat vBox, vSeq global gPicBox put "PictTyp" & string(vBox) into vName put item vSeq of field vName into vZ put value(vZ) into vTyp put vTyp into gPicBox return(vTyp)-- ++++++++++++++++++++++++++++++++ get Picture & Display vMat of vBoxmacro dispPictPHT vMat global gPicBox global gPathPict global gPHTnum global gPictNum if (vMat = 0) then return end if put seqOfMat(gPHTnum, vMat) into vSeq if (vSeq = 0) then return end if put typOfMat(gPHTnum, vSeq) into vTyp if (vTyp = 0) then return end if if (vSeq < 10) then put gPathPict & "P" & string(gPHTnum) & "0" & string(vSeq) into vName put "PL-" & string(gPHTnum) & "0" & string(vSeq) into vPAL else put gPathPict & "P" & string(gPHTnum) & string(vSeq) into vName put "PL-" & string(gPHTnum) & string(vSeq) into vPAL end if put vSeq into gPictNum cursor 4 erasePANEL()-- go to frame "PHT02" puppetSprite 20,TRUE spriteBox 20, 640, 480, 640, 480 set the visibility of sprite 20 to FALSE upDateStage puppetPalette vPAL upDateStage getPicture(the number of cast "PHT.PICT", vName & ".DIB") setPictSprite(20,"PHT.PICT",0) if (gPicBox = 1) then spriteBox 20, 64, 24, 64 + 432, 24 + 432 end if if (gPicBox = 2) then spriteBox 20, 48, 66, 48 + 464, 66 + 348 end if if (gPicBox = 3) then spriteBox 20, 106, 8, 106 + 348, 8 + 464 end if set the visibility of sprite 20 to TRUE cursor -1 upDateStage-- ++++++++++++++++++++++++++++++++ erase Picture from stagemacro erasePictPHT global gPathItem global gPHTnum global gPictNum global gSLDmode put 0 into gPictNum put 0 into gSLDmode cursor 4 spriteBox 20, 640, 480, 640, 480 set the visibility of sprite 20 to FALSE clrPicture("PHT.PICT") puppetSprite 20, FALSE upDateStage dispPANEL() cursor -1 upDateStage-- ++++++++++++++++++++++++++++++++ get PANEL Picturemacro dispPANEL global gPHTnum global gPathItem put gPathItem & "PANEL" & string(gPHTnum) into vName put "PL-" & string(gPHTnum) & "00" into vPAL cursor 4 puppetPalette vPAL-- go to frame "PHT01" puppetSprite 19,TRUE spriteBox 19, 640, 480, 640, 480 set the visibility of sprite 19 to FALSE upDateStage getPicture(the number of cast "PHT.PANEL", vName & ".DIB") setPictSprite(19,"PHT.PANEL",0) spriteBox 19, 16, 80, 16 + 528, 80 + 384 set the visibility of sprite 19 to TRUE cursor -1 upDateStage-- ++++++++++++++++++++++++++++++++ erase PANEL from stagemacro erasePANEL global gPathItem global gPHTnum global gPictNum global gSLDmode cursor 4 spriteBox 19, 640, 480, 640, 480 set the visibility of sprite 19 to FALSE clrPicture("PHT.PANEL") puppetSprite 19, FALSE upDateStage cursor -1 upDateStage-- ++++++++++++++++++++++++++++++++ start SLIDE SHOW modemacro startSLD global gSLDmode global gSLDtim put 1 into gSLDmode set the timer to gSLDtim + 1 dispNextPHT()-- ++++++++++++++++++++++++++++++++ stop SLIDE SHOW modemacro stopSLD global gSLDmode global gSLDtim put 0 into gSLDmode-- ++++++++++++++++++++++++++++++++ get next Picture & Display in SLIDE SHOW modemacro dispNextPHT global gPicBox global gPathPict global gPHTnum global gPictNum global gPictMax global gSLDmode global gSLDtim if (gSLDmode = 0) then return end if if (the timer < gSLDtim) then return end if put (gPictNum + 1) into vSeq if (vSeq < 1) then put 1 into vSeq end if if (vSeq > gPictMax) then put 1 into vSeq end if put vSeq into gPictNum if (vSeq = 0) then return end if put typOfMat(gPHTnum, vSeq) into vTyp if (vTyp = 0) then return end if if (vSeq < 10) then put gPathPict & "P" & string(gPHTnum) & "0" & string(vSeq) into vName put "PL-" & string(gPHTnum) & "0" & string(vSeq) into vPAL else put gPathPict & "P" & string(gPHTnum) & string(vSeq) into vName put "PL-" & string(gPHTnum) & string(vSeq) into vPAL end if cursor 4 erasePANEL() puppetSprite 20,TRUE spriteBox 20, 640, 480, 640, 480 set the visibility of sprite 20 to FALSE upDateStage puppetPalette vPAL upDateStage getPicture(the number of cast "PHT.PICT", vName & ".DIB") setPictSprite(20,"PHT.PICT",0) if (gPicBox = 1) then spriteBox 20, 64, 24, 64 + 432, 24 + 432 end if if (gPicBox = 2) then spriteBox 20, 48, 66, 48 + 464, 66 + 348 end if if (gPicBox = 3) then spriteBox 20, 106, 8, 106 + 348, 8 + 464 end if set the visibility of sprite 20 to TRUE startTimer cursor -1 upDateStage
-- For Movie Box-- ++++++++++++++++++++++++++++++++ initialize of Movie Box (vBox)macro initMVB global gPathItem cursor 4 aiffSound(3) chgScene("PL-400", the frame + 1, gPathItem & "BG400.DIB") upDateStage cursor -1-- ++++++++++++++++++++++++++++++++ termination of Movie Boxmacro termMVB mode global gPHTnum cursor 4 repeat with n = 2 to 24 puppetSprite n, FALSE end repeat puppetTransition 23 upDateStage if (mode = -1) then go to frame "OPN01" exit end if put mode into gPHTnum go to frame "PHT00"-- ++++++++++++++++++++++++++++++++ termination of Movie Box (MovieAppear mode)macro termMVX mode global gPHTnum cursor 4 qtStp(21) repeat with n = 2 to 24 puppetSprite n, FALSE end repeat puppetTransition 23 upDateStage if (mode = -1) then go to frame "OPN01" exit end if put mode into gPHTnum go to frame "PHT00"-- ++++++++++++++++++++++++++++++++ return position of MovieMatrix(3 * 3)macro nOfMatrix2 put the left of sprite clickOn() into L put the top of sprite clickOn() into T put (mouseH() - L) / 104 into hBlock put (mouseV() - T) / 96 into vBlock put ((vBlock * 5) + hBlock) + 1 into vMat return(vMat)
-- For Demo-- ++++++++++++++++++++++++++++++++ DeMoInitmacro initDemo global gDSeq put 1 into gDSeq cursor -1 upDateStage-- ++++++++++++++++++++++++++++++++ Disp Piecemacro dispPiece global gDSeq global gPathItem put ((gDseq - 1) / 10) into vL put ((gDseq - 1) mod 10) into vC put item (vC +1) of (line (vL + 1) of field "DemoSeq") into vZ put value(vZ) into vSeq put ((vSeq - 1) / 10) into vY put ((vSeq - 1) mod 10) into vX if (vSeq < 10) then put "0" & string(vSeq) into vN else put string(vSeq) into vN end if puppetSprite 20, TRUE spriteBox 20, 640,480,640,480 upDateStage getPicture(the number of cast "OPN.PIE", gPathItem & "PIECE:P" & vN & ".DIB") setPictSprite(20, "OPN.PIE", 0) spriteBox 20, (vX * 64), (vY * 60), (vX * 64) + 64, (vY * 60) + 60 set the trails of sprite 20 to TRUE upDateStage put gDseq + 1 into gDseq if (gDseq > 80) then termDemo() end if-- ++++++++++++++++++++++++++++++++ DeMoTermmacro termDemo global gPathItem cursor 4 spriteBox 20, 640,480,640,480 set the visibility of sprite 20 to FALSE clrPicture("OPN.PIE") puppetSprite 20,FALSE upDateStage getPicture(the number of cast "BCK.PICT", gPathItem & "BGOPN.DIB") puppetTransition 23 go to frame "OPN01"
-- For MVB Movie-- ++++++++++++++++++++++++++++++++ open Movie in Movie Boxmacro qtDispMVB vNum global gDisc global gPathItem put item vNum of field "MovSeq" into vZ put value(vZ) into vSeq if (vSeq = 0) then return end if cursor 4 put vSeq into vNum put "PL-40" & string(vNum) into vPAL if (vNum <10) then put "0" & string(vNum) into vBN else put string(vNum) into vBN end if put "MVB0" & string(vNum) into vFL chgScene("PL-CINEPAK" , "MVB01", gPathItem & "BG4" & vBN & ".DIB") aiffSound(0) puppetSprite 21,TRUE set the visibility of sprite 21 to FALSE puppetTransition 23 upDateStage set the type of sprite 21 to 60 put the number of cast ("MOV" & vBN) into vQtNum set the castNum of sprite 21 to vQtNum set the sound of cast vQtNum to FALSE set the visibility of sprite 21 to TRUE upDateStage qtTop(21) set the sound of cast vQtNum to TRUE upDateStage cursor -1-- ++++++++++++++++++++++++++++++++ close Movie in Movie Boxmacro qtHideMVB global gPathItem cursor 4 qtStp(21) puppetSprite 21,FALSE puppetTransition 23 upDateStage aiffSound(3) go to frame "MVB00"
Script Channel Commands
--------------------
initRCP()initDemo()dispPiece()aiffSound(1)go to the frameopenHOME()aiffSound(1)go to the frameinitPHT()initMVB()aiffSound(3)go to the frameaiffSound(2)dispNextPHT()go to the framego to the frame
vwci
----
1025: EmptyPict
1026: BCK.PICT
1027: OPN.PIE
1028: on mouseUp termDemo()end mouseUpOPN.MAT0
1029: on mouseUp HomeBranch(1)end mouseUpOPN.MAT1
1030: on mouseUp HomeBranch(2)end mouseUpOPN.MAT2
1031: on mouseUp HomeBranch(3)end mouseUpOPN.MAT3
1032: on mouseUp HomeBranch(4)end mouseUpOPN.MAT4
1033: on mouseUp HomeBranch(5)end mouseUpOPN.MAT5
1034: on mouseUp HomeBranch(6)end mouseUpOPN.MAT6
1035: on mouseUp HomeBranch(0)end mouseUpOPN.MAT7
1036: on mouseUp termPHT(4)end mouseUpPHT.MAT4
1037: on mouseUp termPHT(5)end mouseUpPHT.MAT5
1038: MVB.MOV
1041: on mouseUp termPHT(-1)end mouseUpPHT.HOM
1042: on mouseUp termPHT(1)end mouseUpPHT.MAT1
1043: on mouseUp termPHT(2)end mouseUpPHT.MAT2
1044: on mouseUp termPHT(3)end mouseUpPHT.MAT3
1045: on mouseUp termPHT(4)end mouseUpPHT.MAT6
1046: on mouseUp startSLD()end mouseUpPHT.SLD
1047: on mouseUp stopSLD()end mouseUpPHT.STP
1048: PHT.PANEL
1049: on mouseUp dispPictPHT(nOfMatrix())end mouseUpPHT.MAT0
1050: on mouseUp erasePictPHT()end mouseUpPHT.PICT
1051: on mouseUp termMVB(4)end mouseUpMVB.MAT4
1052: on mouseUp termMVB(5)end mouseUpMVB.MAT5
1057: on mouseUp termMVB(-1)end mouseUpMVB.HOM
1058: on mouseUp termMVB(1)end mouseUpMVB.MAT1
1059: on mouseUp termMVB(2)end mouseUpMVB.MAT2
1060: on mouseUp termMVB(3)end mouseUpMVB.MAT3
1061: on mouseUp qtDispMVB(nOfMatrix2())end mouseUpMVB.MAT0